package com.arsn.dome.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.arsn.dome.converter.CreateTimeConverter;
import com.arsn.dome.converter.SexConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户实体类
 *
 */

@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class UserExcel implements Serializable {

    @ColumnWidth(20)
    @ExcelProperty("id")
    private Integer id;// int(11) NOT NULL AUTO_INCREMENT,

    @ColumnWidth(25)
    @ExcelProperty("姓名")
    private String name;// varchar(63) NOT NULL COMMENT '姓名',

    @ColumnWidth(15)
    @ExcelProperty(value = "性别",converter = SexConverter.class)
    private Integer sex;// varchar(3) NOT NULL COMMENT '性别',

    @ColumnWidth(15)
    @ExcelProperty("年龄")
    private Integer age;// int(3) DEFAULT NULL COMMENT '年龄',

    /**
     * 导出表格时忽略，不显示
     */
    @ExcelIgnore
    private String pictrue;

    @ColumnWidth(40)
    @ExcelProperty(value = "创建时间",converter = CreateTimeConverter.class)
    private Date createTime;//创建时间

}
